import request from '@/utils/request'

export function getMenuList(parentId,status,roleId,flag){
	return request({
		url:'/admin/managerMenu/getMenuList',
		method:'post',
		data:{
			parentId,
			status,
			roleId,
			flag
		}
	})
}

export function getMenuInfo(menuId){
	return request({
		url:'/admin/managerMenu/getMenuInfo',
		method:'post',
		data:{
			menuId
		}
	})
}

export function addMenu(menuName,parentId,level,permissionUrl,remark,url){
	return request({
		url:'/admin/managerMenu/addMenu',
		method:'post',
		data:{
			menuName,
			parentId,
			level,
			permissionUrl,
			remark,
			url
		}
	})
}

export function updateMenu(menuId,menuName,permissionUrl,remark,url,status){
	return request({
		url:'/admin/managerMenu/updateMenu',
		method:'post',
		data:{
			menuId,
			menuName,
			permissionUrl,
			remark,
			url,
			status
		}
	})
}

export function deleteMenu(menuId){
	return request({
		url:'/admin/managerMenu/deleteMenu',
		method:'post',
		data:{
			menuId,
			status:2
		}
	})
}